<?php
echo $this->load->view('home/cabecalho')
?>


<form enctype="multipart/form-data" action="<?php echo base_url('index.php/certidoes/upload') ?>" method="post">

    <div class="row">
        <div class="large-8 columns" style="left: 181px;">
            <h1>
                <small>Cadastro de Certidões</small>
            </h1>
        </div>                
    </div>


    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <label>Empresa:
                <select name="empresa" id="empresa" class="" >
                    <option  value="">--Selecione--</option>
                    <?php
                    $empr = $this->db->get('empresas')->result();
                    foreach ($empr as $e) {
                        ?>
                        <option value="<?php echo $e->empresas_id ?>"><?php echo $e->empresas_razaoSocial ?></option>
                        <?php
                    }
                    ?>
                </select>

            </label>                   
        </div>                
    </div>
    <br />

    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <label>Órgão:
                <select name="orgao" id="orgao" class="" >
                    <option  value="">--Selecione--</option>
                    <?php
                    $tipoCnds = $this->db->get('tipocnd')->result();
                    foreach ($tipoCnds as $tipoCnd) {
                        ?>
                        <option value="<?php echo $tipoCnd->tipoCnd_id ?>"><?php echo $tipoCnd->tipoCnd_descricao ?></option>
                        <?php
                    }
                    ?>
                </select>
            </label>                
        </div>                
    </div>
    <br />



    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <label>Tipo:
                <select name="tipo" id="tipo" class="" >
                    <option value="1">Certidão Negativa de Débitos</option>
                    <option value="2">Pendência</option>

                </select>
            </label>                
        </div>                
    </div>
    <br />
    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <label>Data de Emissão:
                <input type="text" name="data" id="mdata" class="mdata" value="">
            </label>                
        </div>                
    </div>
    <br />


    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <input class="" type="hidden" name="MAX_FILE_SIZE" value="30000000000000000000000000000000000000000000000000000000000" />
            <label> Selecione a Certidão para envio: <input name="userfile" class="button small" style="width: 640px" size="20" type="file" /></label>
        </div>

    </div>
    <br />
    <div class="row">
        <div class="small-8 columns" style="left: 181px">
            <input type="submit" class="button success small" value="Enviar arquivo" />
        </div>
    </div>
</form>



</div>
<br />






<div style="clear: both">

</div>


<script>
    jQuery(function ($) {
        $("#mdata").mask("99/99/9999", {placeholder: " "});
    });
</script>